import request from 'utils/request.js'

// 获取 文章列表

const getArtList = (params = {})=> request.get('/getArtList',{ params })

// 增加文章
const addArt = (params = {})=> request.post('/addArt', params)

// 根据id 获取文章

const getArt = (id) => request.get(`/getArt?id=${id}`)

// 更新文章

const updateArt = (params) => request.post('/editArt', params)

// 删除文章

const delArt = (id)=> request.post('/delArt',{id})

// 用户登录
const doLogin = (params = {})=> request.post('/login',params)
export { 
		getArtList,
		addArt,
		getArt,
		updateArt,
    delArt,
    doLogin
}